//
//  WaterFallFlowModel.m
//  WaterfallFlow
//
//  Created by 方正刚 on 2017/8/21.
//  Copyright © 2017年 方正刚. All rights reserved.
//

#import "WaterFallFlowModel.h"

@implementation WaterFallFlowModel

- (instancetype)initWithDict:(NSDictionary *)dict {
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}


+ (instancetype)flowModelsWithDict:(NSDictionary *)dict {
    
    return [[self alloc] initWithDict:dict];
}


+ (NSArray *)datas {
  
    NSString *path = [[NSBundle mainBundle] pathForResource:@"WaterFallFollowDataSource.plist" ofType:nil];
    
    NSArray *dataArr = [NSArray arrayWithContentsOfFile:path];
    
    NSMutableArray *arrayM = [NSMutableArray arrayWithCapacity:4];
    
    [dataArr enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
       
        NSDictionary *dic = obj;
        
        [arrayM addObject:[WaterFallFlowModel flowModelsWithDict:dic]];
        
    }];
    
    return arrayM.copy;
    
}


@end
